<template>
  <div class="header">
    <top-bar class="top-bar">
      <div slot="left" class="logo hidden-md-and-down">Logo</div>
      <div slot="center" class="center">
        <a :href="item.target" v-for="item in navation">
          {{ item.title }}
        </a>
      </div>
      <div slot="right" class="right">
        <div>夜间转换</div>
        <div>用户设置</div>
      </div>
    </top-bar>
  </div>
</template>

<script>
import TopBar from "components/common/TopBar/TopBar"

export default {
  data() {
    return {
      navation: [
        {
          title: '首页',
          target: '/home'
        },
        {
          title: '论坛',
          target: '/forum'
        },
        {
          title: '文章',
          target: '/article'
        },
        {
          title: '比赛',
          target: '/match'
        }
      ]
    }
  },
  components: {
    TopBar
  }

}
</script>

<style lang="scss" scoped>
.top-bar {
  .logo {
    width: 60px;
    height: 44px;
    background-color: pink;
  }

  .right {
    display: flex;
  }
}

@media screen and(max-width:1200px) {
  .header {
    width: 100%;
    height: 100%;

    .top-bar {

      height: 80px !important;

      .center {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        height: 80px;
      }

      .right {
        height: 100%;
        flex-direction: column;
        justify-content: space-between;
      }
    }
  }



}
</style>